
<#
.SYNOPSIS 
Hydration Script for MDTEx

.DESCRIPTION
_TEMPLATE_

.NOTES
Copyright Keith Garner (KeithGa@DeploymentLive.com), All rights reserved.

.LINK
http://MDTEx.CodePlex.com

#>

param(
    [switch] $Quiet,
    [parameter(mandatory=$true,HelpMessage="Location of Local Deployment Share.")]
    [string] $DeploymentLocalPath, # Example: c:\DeploymentShare
    [parameter(ValueFromRemainingArguments=$true)] $Remaining
)


"Move Images... " | Write-LogVerbose

foreach ( $Name in get-childitem -path "$deploymentlocalPath\Control\*.cre" | select-object -ExpandProperty Basename | %{ $_.Replace(".CRE","") })
{
    Move-Item "$deploymentlocalPath\Captures\$Name.wim" "$deploymentlocalPath\Operating Systems\Deploy\$Name\sources\install.wim" -Force
}